<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <h:head>
       <title>合同内容</title>
        <script language="javascript">
            function updateContent(pcode,pname)
            {
		 window.opener.updateContent(pcode,pname);
                 window.close();
	    }
        </script>
    </h:head>
    <body>
        <h:form>
        <rich:panel header="合同内容列表">
            <rich:extendedDataTable id="goodsTypes" value="#{goodsType.typelist}" var="gtype"
                                    rowClasses="list-row-odd,list-row-even" 
                                    headerClass="table-header" >
                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="代码"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:commandLink>
                        <h:outputText value="#{gtype.code}"/>
                    </h:commandLink>
                </rich:column>
                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="名称"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{gtype.name}"/>
                </rich:column>
                <rich:column>
                    <f:facet name="header">
                        <h:panelGroup>
                            <h:outputText value="备注"/>
                        </h:panelGroup>
                    </f:facet>
                    <h:outputText value="#{gtype.memo}"/>
                </rich:column>
                <rich:column>
                    <h:commandLink id="employeeslink" onclick="updateContent('#{gtype.code}','#{gtype.name}')">
                        <h:outputText value="选择" />
                    </h:commandLink>
                </rich:column>
            </rich:extendedDataTable>
        </rich:panel>
        </h:form>
    </body>
</html>




